#include "graph.h"
#include <malloc.h>

void graph_CreateEdge(GraphNode *n, GraphNode *adjacent);

GraphNode *new_GraphNode(void)
{
	GraphNode *gn = (GraphNode*)malloc(sizeof(GraphNode));
	gn->Value = 0x0;
	gn->Adjacent = new(List);
	return gn;
}

Graph new_Graph(void)
{
	Graph g;
	g.Handle = 0x0;
	g.CreateEdge = graph_CreateEdge;
	return g;
}

void destroy_Graph(Graph *g)
{
	free(g);
	//ToDo: Write function
}

void graph_CreateEdge(GraphNode *n, GraphNode *adjacent)
{
	n->Adjacent.Append(&n->Adjacent, adjacent);
}
